package command

import (
	"gopkg.in/mgo.v2/bson"
)

var DATABASE string = "shansjlin"
var COLLECTION string = "linyanwen"

type CommandData struct {
	Action    CommandAction
	UserKey   string
	TimeStamp string
	Message   string
	Result    chan<- []interface{}
}

type CommandAction int

const (
	InsertAction CommandAction = iota
	FindAction
)

type UserData struct {
	Id_       bson.ObjectId `bson:"_id"`
	UserKey   string        `bson:"userkey"`
	TimeStamp string        `bson:"timestamp"`
	Message   string        `bson:"message"`
}
